<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0030)http://localhost:8080/House-2/ -->
<HTML xmlns="http://www.w3.org/1999/xhtml">
<HEAD>
<TITLE>云和租房 - 首页</TITLE>
	<META content="text/html; charset=utf-8" http-equiv=Content-Type>
	<LINK rel=stylesheet type=text/css href="../css/style.css">
	<META name=GENERATOR content="MSHTML 8.00.7601.17514">
</HEAD>
<BODY>
	<DIV id=header class=wrap>
		<DIV id=logo><IMG src="../images/logo.gif"></DIV>
	</DIV>
	<DIV id=navbar class=wrap>
		<DL class="search clearfix">
		  <FORM id=frm method=post>
			  <DT>
				  <UL>
				    <LI class=bold>房屋信息</LI>
				    <LI>标题：
					    <INPUT class=text type=text name="title" id="title"> 
					    <LABEL class=ui-blue>
					    		<INPUT value="搜索房屋 " type="button"  onclick="a()">
					    </LABEL> 
				    </LI>
				  </UL>
			  </DT>
			  <DD>
				  <UL>
				    <LI class=first>价格 </LI>
				    <LI>
					    <SELECT name="price" id="price" onchange="c();b()"> 
					    	<OPTION selected value="">不限</OPTION> 
					    	<OPTION value=100>100元</OPTION> 
					    	<OPTION value=200>200元</OPTION> 
					      	<OPTION value=500>500元</OPTION>
					    </SELECT> 
				    </LI>
				  </UL>
			  </DD>
			  <DD>
				  <UL>
				    <LI class=first>房屋位置</LI>
				    <LI>
				    <SELECT id=street name=street_id onchange="c()"> 
				    	<OPTION selected value="">不限</OPTION> 
				    	<OPTION value=1000>知春路</OPTION> 
				    	<OPTION value=1001>中关村大街</OPTION> 
				      	<OPTION value=1002>学院路</OPTION> 
				      	<OPTION value=1003>朝阳路</OPTION>
				    </SELECT>
				    </LI>
				  </UL>
			  </DD>
			  <DD>
				  <UL>
				    <LI class=first>房型</LI>
				    <LI>
					    <SELECT name=type_id id="type_id" onchange="c()"> 
					    	<OPTION selected value="">不限</OPTION> 
					    	<OPTION value=1000>一室一厅</OPTION> 
					      	<OPTION value=1001>一室两厅</OPTION>
					      	<OPTION value=1002>两室一厅</OPTION>
					       	<OPTION value=1003>两室两厅</OPTION>
					    </SELECT> 
				  	</LI>
				  </UL>
			  </DD>
			  <DD>
				  <UL>
				    <LI class=first>面积 </LI>
				    <LI>
				    	<SELECT name=floorage id="floorage" onchange="c()"> 
					    	<OPTION selected value="">不限</OPTION> 
					    	<OPTION value=0-40>40以下</OPTION> 
					     	<OPTION value=40-500>40-500</OPTION>
					      	<OPTION value=500-1000000>500以上</OPTION>
				      	</SELECT>
				     </LI>
				   </UL>
			   </DD>
		   </FORM>
		</DL>
	</DIV>
	<DIV class="main wrap">
		<TABLE class=house-list id="showTable">
			  <TBODY>
				 
			  </TBODY>
		</TABLE>
		<DIV class=pager>
			<UL>
				 <LI class=current><A href="#">首页</A></LI>
				 <LI><A href="#">上一页</A></LI>
				 <LI><A href="#">下一页</A></LI>
				 <LI><A href="#">末页</A></LI>
			</UL>
			<SPAN class=total>1/2页</SPAN> 
		</DIV>
	</DIV>
	<DIV id=footer class=wrap>
		<DL>
		  <DT>云和租房 © 2010 云和 京ICP证1000001号</DT>
		  <DD>关于我们 · 联系方式 · 意见反馈 · 帮助中心</DD>
		</DL>
	</DIV>
</BODY>
<script type="text/javascript" src="/scripts/jquery.js"></script>
<!-- 点击按钮按名称搜索 -->
<script>
	function a(){
		var title=document.getElementById("title").value;
		frm.action="selectByTitle"+".action";
		frm.submit();
	}
</script>
<!-- 根据下拉列表查询 -->
<script>
	//获取所有下拉列表的值
	function c(){
		var jiaqian=$("#price").val();
		var weizhi=$("#street").val();
		var huxing=$("#type_id").val();
		var mianji=$("#floorage").val();
		alert(jiaqian);alert(weizhi);alert(huxing);alert(mianji);
	}
	function b(){
		var url="jiage.action";
		alert($("#price").val());
		$(function() {
			
			$.ajax({
				url : url,
				type : 'POST', //数据发送方式 
				dataType:'text',//接受数据格式 (这里有很多,常用的有html,xml,js,json) 
				data: {
					 "price": $("#price").val() //获取id为username的文本值传到后台action
	            },
	            error : function(msg) { //失败 
					alert('失败');
	            	alert(msg);
				},
				success : function(data) { //成功
					alert("成功");
					alert(data);				
				}
			});
		})
	}
</script>
</HTML>